package org.example.demo4.service.impl;


import org.springframework.stereotype.Service;
import org.example.demo4.service.SysUserService;
import org.example.demo4.model.SysUserEntity;
import org.example.demo4.mapper.freight.SysUserMapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 服务层实现。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUserEntity> implements SysUserService {


    @Autowired
    private SysUserMapper userMapper;

    /**
     * 通过用户名查询用户
     *
     * @param userName 用户名
     * @return 用户对象信息
     */
    @Override
    public SysUserEntity selectUserByUserName(String userName)
    {
        return userMapper.selectUserByUserName(userName);
    }

    @Override
    public int updateUserProfile(SysUserEntity user)
    {
        return userMapper.update(user);
    }


}